<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edition Personne</title>
</head>
<body>
<c:choose>
	<c:when test="${not empty personne}">
		
		<form action="/personne/Submit" method="post">
	</c:when>
	<c:otherwise>
		<form action="/personne/Add" method="post">
	</c:otherwise>
</c:choose>

<form action="/personne/Submit" method="post">
	<input type="hidden" name="id" value="${personne.id}"/>
	<table>
		<tr>
			<td>
				Nom:
			</td>
			<td>
				<input type="text" name="name" value="${personne.name}"/>
			</td>
		</tr>
		<tr>
			<td>
				Prénom:
			</td>
			<td>
				<input type="text" name="forName" value="${personne.forName}"/>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<c:choose>
					<c:when test="${ personne.guest}">
							<input type="checkbox" id="guest" name="guest" value="true" checked="checked" /> est invité
				
							 	
					</c:when>
					<c:otherwise>
							<input type="checkbox" id="guest" value="true" name="guest"	/> est invité
					</c:otherwise>
				</c:choose>
			</td>
			<td>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" class="save" value=""/>
			</td>
		</tr>
	</table>
	
	
	
</form>

</body>
</html>